"use strict";

const eslintPluginMemoryLink = require("./rule/eslint-plugin-memory-link");
const vueEslintParser = require("vue-eslint-parser");

module.exports = [
  {
    files: ["**/*.vue"],
    languageOptions: {
      ecmaVersion: "latest",
      sourceType: "module",
      parser: vueEslintParser,
    },
    plugins: { memoryLink: eslintPluginMemoryLink },
    rules: {
      "memoryLink/bus-on-off": "error",
      "memoryLink/jquery-on-off": "error",
      "memoryLink/dom-ref-leak": "error",
      "memoryLink/clear-interval": "error",
      "memoryLink/window-leak": "error",
      "no-var": "error",
    },
  },
];
